<?php

namespace app\controller;

use app\Enums\LogChannel;
use app\repository\LogsRepository;
use support\Request;

class LogsController extends BaseController
{
    protected $repository;

    public function __construct(LogsRepository $repository)
    {
        $this->repository = $repository;
    }

    public function list(Request $request)
    {
        $data = $this->getPageInfo();
        $data["type"] = $request->input("type",0);
        $list = $this->repository->list($data);
        return $this->res($list);
    }

    public function type_list()
    {
        return $this->success(LogChannel::description);
    }


    

}
